* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.todo-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

/* 左侧输入区域样式 */
.input-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.input-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#taskInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#taskInput:focus {
    outline: none;
    border-color: #667eea;
}

#addBtn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#addBtn:hover {
    background: #5a6fd8;
}

#addBtn:active {
    transform: translateY(1px);
}

.input-tip {
    color: #666;
    font-size: 14px;
    text-align: center;
}

/* 右侧任务列表区域样式 */
.list-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.list-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.task-list {
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
}

.task-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.task-item.completed {
    opacity: 0.7;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #999;
}

.task-checkbox {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-text {
    flex: 1;
    font-size: 16px;
    color: #333;
    word-break: break-word;
}

.delete-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.delete-btn:hover {
    background: #ff3742;
}

.list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

#taskCount {
    color: #666;
    font-size: 14px;
}

.clear-btn {
    background: none;
    border: 1px solid #ff4757;
    color: #ff4757;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.clear-btn:hover {
    background: #ff4757;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .todo-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .input-section, .list-section {
        padding: 20px;
    }
}

/* 滚动条样式 */
.task-list::-webkit-scrollbar {
    width: 6px;
}

.task-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.task-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.task-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
